import request from '@/utils/request'


//类上的公共路径
const api_name = '/admin/product/productSpec'

export const GetProductSpecPageList = (page, limit) => {
    return request({
      url: `${api_name}/${page}/${limit}`,
      method: 'get'
    })
}


// 保存信息
export const SaveProductSpec = productSpec => {
    return request({
      url: `${api_name}/save`,
      method: 'post',
      data: productSpec,
    })
}


export const UpdateProductSpecById = productSpec => {
    return request({
        url: `${api_name}/updateById`,
        method: 'put',
        data: productSpec,
    })
}

export const DeleteProductSpecById = id => {
  return request({
      url: `${api_name}/deleteById/${id}`,
      method: 'delete',
      
  })
}

export const FindAllProductSpec = () => {
  return request({
      url: `/admin/product/productSpec/findAll`,
      method: 'get'
  })
}